Optimal. Leaf size=96 \[ -\frac {d^2 \text {Li}_3\left (-e^{2 i (a+b x)}\right )}{2 b^3}+\frac {i d (c+d x) \text {Li}_2\left (-e^{2 i (a+b x)}\right )}{b^2}-\frac {(c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac {i (c+d x)^3}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.15, antiderivative size = 96, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.357, Rules used = {3719, 2190, 2531, 2282, 6589} \[ \frac {i d (c+d x) \text {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{b^2}-\frac {d^2 \text {PolyLog}\left (3,-e^{2 i (a+b x)}\right )}{2 b^3}-\frac {(c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac {i (c+d x)^3}{3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2190
Rule 2282
Rule 2531
Rule 3719
Rule 6589
Rubi steps
\begin {align*} \int (c+d x)^2 \tan (a+b x) \, dx &=\frac {i (c+d x)^3}{3 d}-2 i \int \frac {e^{2 i (a+b x)} (c+d x)^2}{1+e^{2 i (a+b x)}} \, dx\\ &=\frac {i (c+d x)^3}{3 d}-\frac {(c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac {(2 d) \int (c+d x) \log \left (1+e^{2 i (a+b x)}\right ) \, dx}{b}\\ &=\frac {i (c+d x)^3}{3 d}-\frac {(c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac {i d (c+d x) \text {Li}_2\left (-e^{2 i (a+b x)}\right )}{b^2}-\frac {\left (i d^2\right ) \int \text {Li}_2\left (-e^{2 i (a+b x)}\right ) \, dx}{b^2}\\ &=\frac {i (c+d x)^3}{3 d}-\frac {(c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac {i d (c+d x) \text {Li}_2\left (-e^{2 i (a+b x)}\right )}{b^2}-\frac {d^2 \operatorname {Subst}\left (\int \frac {\text {Li}_2(-x)}{x} \, dx,x,e^{2 i (a+b x)}\right )}{2 b^3}\\ &=\frac {i (c+d x)^3}{3 d}-\frac {(c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac {i d (c+d x) \text {Li}_2\left (-e^{2 i (a+b x)}\right )}{b^2}-\frac {d^2 \text {Li}_3\left (-e^{2 i (a+b x)}\right )}{2 b^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 100, normalized size = 1.04 \[ \frac {2 i b^2 (c+d x)^2 \left (b (c+d x)+3 i d \log \left (1+e^{2 i (a+b x)}\right )\right )+6 i b d^2 (c+d x) \text {Li}_2\left (-e^{2 i (a+b x)}\right )-3 d^3 \text {Li}_3\left (-e^{2 i (a+b x)}\right )}{6 b^3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [C] time = 0.50, size = 594, normalized size = 6.19 \[ -\frac {2 \, d^{2} {\rm polylog}\left (3, i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) + 2 \, d^{2} {\rm polylog}\left (3, i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) + 2 \, d^{2} {\rm polylog}\left (3, -i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) + 2 \, d^{2} {\rm polylog}\left (3, -i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) - {\left (-2 i \, b d^{2} x - 2 i \, b c d\right )} {\rm Li}_2\left (i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) - {\left (2 i \, b d^{2} x + 2 i \, b c d\right )} {\rm Li}_2\left (i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) - {\left (2 i \, b d^{2} x + 2 i \, b c d\right )} {\rm Li}_2\left (-i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) - {\left (-2 i \, b d^{2} x - 2 i \, b c d\right )} {\rm Li}_2\left (-i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) + {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \log \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + i\right ) + {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \log \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + i\right ) + {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + 2 \, a b c d - a^{2} d^{2}\right )} \log \left (i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right ) + 1\right ) + {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + 2 \, a b c d - a^{2} d^{2}\right )} \log \left (i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right ) + 1\right ) + {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + 2 \, a b c d - a^{2} d^{2}\right )} \log \left (-i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right ) + 1\right ) + {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + 2 \, a b c d - a^{2} d^{2}\right )} \log \left (-i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right ) + 1\right ) + {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \log \left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + i\right ) + {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \log \left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + i\right )}{2 \, b^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (d x + c\right )}^{2} \sec \left (b x + a\right ) \sin \left (b x + a\right )\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.06, size = 257, normalized size = 2.68 \[ \frac {i d^{2} x^{3}}{3}-\frac {4 i d^{2} a^{3}}{3 b^{3}}+\frac {i d^{2} \polylog \left (2, -{\mathrm e}^{2 i \left (b x +a \right )}\right ) x}{b^{2}}-\frac {c^{2} \ln \left (1+{\mathrm e}^{2 i \left (b x +a \right )}\right )}{b}+\frac {2 c^{2} \ln \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b}+\frac {2 d^{2} a^{2} \ln \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}+i c d \,x^{2}-\frac {2 i d^{2} a^{2} x}{b^{2}}+\frac {2 i c d \,a^{2}}{b^{2}}-\frac {d^{2} \ln \left (1+{\mathrm e}^{2 i \left (b x +a \right )}\right ) x^{2}}{b}+\frac {4 i c d a x}{b}-\frac {d^{2} \polylog \left (3, -{\mathrm e}^{2 i \left (b x +a \right )}\right )}{2 b^{3}}-\frac {4 c d a \ln \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}-i c^{2} x +\frac {i c d \polylog \left (2, -{\mathrm e}^{2 i \left (b x +a \right )}\right )}{b^{2}}-\frac {2 c d \ln \left (1+{\mathrm e}^{2 i \left (b x +a \right )}\right ) x}{b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.53, size = 280, normalized size = 2.92 \[ -\frac {3 \, c^{2} \log \left (-\sin \left (b x + a\right )^{2} + 1\right ) - \frac {6 \, a c d \log \left (-\sin \left (b x + a\right )^{2} + 1\right )}{b} + \frac {3 \, a^{2} d^{2} \log \left (-\sin \left (b x + a\right )^{2} + 1\right )}{b^{2}} + \frac {-2 i \, {\left (b x + a\right )}^{3} d^{2} + {\left (-6 i \, b c d + 6 i \, a d^{2}\right )} {\left (b x + a\right )}^{2} + 3 \, d^{2} {\rm Li}_{3}(-e^{\left (2 i \, b x + 2 i \, a\right )}) + {\left (6 i \, {\left (b x + a\right )}^{2} d^{2} + {\left (12 i \, b c d - 12 i \, a d^{2}\right )} {\left (b x + a\right )}\right )} \arctan \left (\sin \left (2 \, b x + 2 \, a\right ), \cos \left (2 \, b x + 2 \, a\right ) + 1\right ) + {\left (-6 i \, b c d - 6 i \, {\left (b x + a\right )} d^{2} + 6 i \, a d^{2}\right )} {\rm Li}_2\left (-e^{\left (2 i \, b x + 2 i \, a\right )}\right ) + 3 \, {\left ({\left (b x + a\right )}^{2} d^{2} + 2 \, {\left (b c d - a d^{2}\right )} {\left (b x + a\right )}\right )} \log \left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right )}{b^{2}}}{6 \, b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {\sin \left (a+b\,x\right )\,{\left (c+d\,x\right )}^2}{\cos \left (a+b\,x\right )} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (c + d x\right )^{2} \sin {\left (a + b x \right )} \sec {\left (a + b x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________